package com.thyme.user;

import com.thyme.user.dao.user.UserMapper;
import com.thyme.user.domain.entity.user.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author thyme
 * @ClassName TestController
 * @Description TODO
 * @Date 2019/10/29 22:51
 */
@RestController
public class TestController {

    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/test")
    public User testNotice(){
        User user = new User();
        user.setAvatarUrl("xxxxx");
        user.setBonus(200);
        user.setCreateTime(new Date());
        user.setUpdateTime(new Date());
        this.userMapper.insertSelective(user);
        return user;
    }


}
